﻿using System.Web.Mvc;
using EzDesk.Apps.Interface.ProjectModule;
using EzDesk.Apps.ServiceImpl.ProjectModule;
using EzDesk.Apps.ServiceImpl.ProjectModule.History;
using EzDesk.Core.Interface;
using EzDesk.Core.ServiceImpl.Services;

namespace EzDesk.ServiceHost.Controllers
{
    [EzAuthorize]
    public partial class ProjectController
    {
        private readonly IProjectService _projectService = new ProjectService();
        IProjectService ProjectService
        {
            get { return _projectService; }
        }

        private readonly ICoreAppService _coreAppService = new CoreAppService();

        private HistoryManager _historyManager = new HistoryManager();

        protected HistoryManager HistoryManager
        {
            get { return _historyManager; }
        }


        public ActionResult TestApns()
        {
            var deviceToken = _coreAppService.GetDeviceToken(CurrentUserId);
            var body = "hello";
            var workitemId = "123456";

            _projectService.TestApns(deviceToken, body, workitemId);
            return null;
        }
    }
}